package com.google.android.vending.licensing;

import android.text.TextUtils;
import java.util.regex.Pattern;

public class ResponseData
{
  public String extra;
  public int nonce;
  public String packageName;
  public int responseCode;
  public long timestamp;
  public String userId;
  public String versionCode;

  public static ResponseData parse(String paramString)
  {
    int i = paramString.indexOf(':');
    String str1;
    String str2;
    String[] arrayOfString;
    if (-1 == i)
    {
      str1 = paramString;
      str2 = "";
      arrayOfString = TextUtils.split(str1, Pattern.quote("|"));
      if (arrayOfString.length < 6)
        throw new IllegalArgumentException("Wrong number of fields.");
    }
    else
    {
      str1 = paramString.substring(0, i);
      if (i >= paramString.length());
      for (str2 = ""; ; str2 = paramString.substring(i + 1))
        break;
    }
    ResponseData localResponseData = new ResponseData();
    localResponseData.extra = str2;
    localResponseData.responseCode = Integer.parseInt(arrayOfString[0]);
    localResponseData.nonce = Integer.parseInt(arrayOfString[1]);
    localResponseData.packageName = arrayOfString[2];
    localResponseData.versionCode = arrayOfString[3];
    localResponseData.userId = arrayOfString[4];
    localResponseData.timestamp = Long.parseLong(arrayOfString[5]);
    return localResponseData;
  }

  public String toString()
  {
    Object[] arrayOfObject = new Object[6];
    arrayOfObject[0] = Integer.valueOf(this.responseCode);
    arrayOfObject[1] = Integer.valueOf(this.nonce);
    arrayOfObject[2] = this.packageName;
    arrayOfObject[3] = this.versionCode;
    arrayOfObject[4] = this.userId;
    arrayOfObject[5] = Long.valueOf(this.timestamp);
    return TextUtils.join("|", arrayOfObject);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.google.android.vending.licensing.ResponseData
 * JD-Core Version:    0.6.2
 */